Monitoring cameras are commonly used to monitor building, roads, shops and various other places. In particular, cameras are often used to monitor scenes to allow automatic detection or tracking of events in the form of presence of motion or presence of an object of a specific type. Such monitoring cameras can be used both indoors and outdoors. A monitoring camera mounted outdoors is sometimes exposed to harsh weather conditions such as wind, snow and rain. Additionally, dust and dirt carried by winds or from air pollution may be deposited on the camera. A common problem which occurs when rain drops or collections of dust particles are present in the view of the camera is that these by mistake trigger alarms. This typically happens when the camera is unable to separate a small object close by, such as a rain drop trickling down the cover glass of the camera lens, from a larger object more far away, such as a car or a person moving at a distance from the camera.
Another problem which may occur when water drops or spots of dirt is present on a cover glass of the camera is that the camera's focus lens system will focus on the water drops or the spots, instead of on more interesting objects in the monitored environment. These “real” objects may then become blurry and difficult to see for an operator.
Different solutions have been presented in this area. One example is disclosed in Applicant's EP 2 587 462, where data from the auto-focus mechanism is utilized to find the distance to an object and only objects that are within a certain distance interval to the camera are considered objects of interest and allowed to trigger an alarm. Other solutions also exist, such as using active distance measurement devices, e.g. based on lasers or ultrasound measurements, in order to make sure that objects that are close to the camera do not trigger alarms. However, there is still room for more improvement in this area.